<template>
  <view>
	  <u-navbar :is-back="false" title="促销列表"
	    title-size="30"
	    :background="{background:'#2B88FE' }"
	    title-color="#fff">
	    <div class="head_icon">
	      <u-icon @click="$api.handleBackTo"
	        name="arrow-left" color="#fff"
	        size="36">
	      </u-icon>
	      <u-icon @click="$api.handleHomeTo"
	        name="home" color="#fff" size="36">
	      </u-icon>
	    </div>
	  </u-navbar>
    <CommDetail :cid="cid" :info="info" :current="4">

 
     <view
       class="interval u-skeleton-rect">
       促销 <u-button style="margin:20rpx" size="mini" type="primary"  
		 @click="OnClinkT">新增促销
			   </u-button>
			   
			   </view> 
	 
	 <u-table>
	   <u-tr>
	     <u-th>姓名</u-th>
		   <u-th>支付时间</u-th>
	     <u-th>对账数量</u-th>
	     <u-th>领取金额</u-th>
	    
	   </u-tr>
	   <u-tr v-for="(g,index) in list" :key="index">
	     <u-td>
	      <navigator :url="`/pages/my_customer/SaleDetail?id=${g.fMrkId}&sid=${g.fId}`">
	        <div class="yi"> {{g.fName}}   </div>
	       </navigator>
	     </u-td>
		 <u-td>
		   {{g.fPayTime}}
		 </u-td>
	     <u-td>
	       {{g.fSalesCount}}
	     </u-td>
	     <u-td>
	       {{g.fMoneyPay}}
	     </u-td>
	  
	   </u-tr>
	 </u-table>
	  
	  
	  
	  
      <u-empty text="暂无数据" mode="list" v-if="!list.length">
      </u-empty>
     
    </CommDetail>

   

  </view>

</template>
<script>
import orlist from '@/components/orlist'
import CommDetail from './commdetail'
export default {
  components: { orlist, CommDetail },
  data() {
    return {
      cid: 0,
      info: {},
      current: 0,
      list: [],
      form: {
        OrderType: 0,
        MrkId: 0,
        Key: '',
        OrderStatus: 0
      } 
	  
    }
  },
  methods: {
    getList() {
		 
         this.$axios('api/SaleBasic/ListPaged', 'post', { value: this.form }).then(res => {
        this.list = res.Value.List
      })
    },
 
	OnClinkT() {
		 
	  uni.navigateTo({
	    url: `/pages/my_customer/SaleAdd?id=${this.cid}`
	  })
	}
  },
  onLoad(e) {
    this.cid = Number(e.id)
    this.$axios('api/MrkBasic/GetDetail', 'post', {
      value: e.id
    }).then(res => {
      this.info = res.Value
      this.loading = false
      this.form.MrkId = this.cid
      this.getList()
    })
  }
}
</script>

<style lang="scss" scoped>
	
	

.interval {
  color: #333;
  font-size: 32upx;
  line-height: 110upx;
  padding: 0 32upx;
}

.listgoods {
  padding: 32upx;
  border-bottom: 1px solid #f8f8f8;
}

.goodsimg {
  width: 144upx;
  height: 144upx;
  display: block;
  margin-right: 24upx;
}

.goodstitel {
  color: #000;
  font-size: 32upx;
}

.rights {
  color: #000;
  font-size: 333;
  font-size: 32upx;
}

.nuber {
  color: #666;
  font-size: 28upx;
  padding-top: 30upx;
}

.time {
  color: #666;
}

.prme {
  color: #000;
  font-size: 32upx;
  font-weight: bold;
}

.viewbbutton {
  position: fixed;
  bottom: 0;
  background: #fff;
  width: 100%;
  .x-row {
    display: flex;
    justify-content: center;
    ::v-deep button {
      margin: 0 20rpx;
    }
  }
}
	
	
</style>